<%-- 
    Document   : exam-result
    Created on : Feb 24, 2012, 11:00:37 PM
    Author     : PhucAn
--%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<table>
    <tr>
        <td>Exam name:</td>
        <td>${exam.name}</td>
        <td>Student name:</td>
        <td>${student.firstName} ${student.lastName}</td>
    </tr>
    <tr>
        <td>Time:</td>
        <td>${exam.time}</td>
        <td>Mark:</td>
        <td>${mark}/${totalMark}</td>
    </tr>
    <tr>
        <td>Test date:</td>
        <td></td>
        <td></td>
        <td></td>
    </tr>
</table>       
        
        <c:forEach  var="q" items="${exam.questionSet}" varStatus="index">
    <div class="question-box">
        <div class="question">Q${index.count}. ${q.content}</div>
        <div class="answer-list">
            <ul>
                <c:forEach var="ans" items="${q.answers}">
                    <li class="${ans.isUserChoice?'user-choice':''} ${ans.isTrue?'correct-answer':''}">${ans.content}</li>
                </c:forEach>
            </ul>
        </div>       
    </div>
</c:forEach>

